<template>
  <absolute-container class="overflow-x-auto overflow-y-auto bg-[#ECF2FC] p-[20px] pr-[10px]">
    
  </absolute-container>
</template>

<script>

export default {
  name: "HomePage",
  components: {
   
  },
  props: {},
  data() {
    return {
    
    };
  },
  async created() {

 
  },
  mounted() {
  },
  methods: {
    onTabClick(item) {
      if (item.label == "设置更多") {
        this.dialogVisible = true;
      } else {
        this.$router.push({ path: item.url });
      }
    },
    async initTab() {
      const { content: tabs = [] } = await userPermissionsList({
        pageIndex: 1,
        length: 9,
      });
      if (Array.isArray(tabs)) {
        this.tabList = tabs.map((item) => ({
          label: item.name,
          url: item.url,
          image: item.attUrl,
        }));
      }
    },
    onSetData() {
      this.initTab();
    },
  },
};
</script>

<style lang="scss" scoped>
.top-banner-wrapper {
  background: transparent url("@/assets/images/bg_main_logo.png") no-repeat 0 0;
  background-size: cover;
}

@media screen and (max-width: 800px) {
  // .top-banner-wrapper {
  //   background-size: 100% 110px;
  // }
  .main-con {
    min-width: 800px;
    // overflow: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .tab-wrapper {
    flex-wrap: wrap;
  }

  .tab-item-wrapper {
    width: 20%;
  }

  ::v-deep .con-left-wrapper {
    flex-wrap: wrap;

    .project-overview-wrapper {
      width: 100%;
      margin-right: 0;
    }

    .approval-center-wrapper {
      width: 100%;
      margin-top: 16px;
      margin-right: 0;
    }

    .warning-reminder-wrapper {
      width: 100%;
      margin-top: 16px;
      margin-right: 0;
    }

    .message-reminder-wrapper {
      width: 100%;
      margin-right: 0;
    }

    // .knowledge-base-wrapper {
    //   width: 100%;
    //   margin-right: 0;
    // }
  }

  ::v-deep .con-right-wrapper > div {
    width: 100%;
    height: auto;
    margin-top: 16px;
    margin-left: 0;
  }

  ::v-deep .video-surveillance-wrapper {
    height: auto;
  }
}

@media screen and (min-width: 800px) {
  // .top-banner-wrapper {
  //   background-size: 100% 110px;
  // }
  .tab-wrapper {
    flex-wrap: wrap;
  }

  .tab-item-wrapper {
    width: 20%;
  }

  ::v-deep .con-left-wrapper {
    flex-wrap: wrap;

    .project-overview-wrapper {
      width: 100%;
      margin-right: 0;
    }

    .approval-center-wrapper {
      width: 100%;
      margin-top: 16px;
      margin-right: 0;
    }

    .warning-reminder-wrapper {
      width: 100%;
      margin-top: 16px;
      margin-right: 0;
    }

    .message-reminder-wrapper {
      width: 100%;
      margin-right: 0;
    }

    // .knowledge-base-wrapper {
    //   width: 100%;
    //   margin-right: 0;
    // }
  }

  ::v-deep .con-right-wrapper > div {
    width: 100%;
    height: auto;
    margin-top: 16px;
    margin-left: 0;
  }

  ::v-deep .video-surveillance-wrapper {
    width: calc((100% - 16px) / 2);
    height: auto;

    & + .video-surveillance-wrapper {
      margin-left: 0;
    }

    &:nth-child(2n + 1) {
      margin-right: 16px;
    }
  }
}

@media screen and (min-width: 992px) {
  // .top-banner-wrapper {
  //   background-size: 100% 110px;
  // }
  .tab-wrapper {
    flex-wrap: wrap;
  }

  .tab-item-wrapper {
    width: 20%;
  }

  ::v-deep .con-left-wrapper {
    flex-wrap: wrap;

    .approval-center-wrapper {
      width: 100%;
      margin-right: 0;
    }

    .warning-reminder-wrapper {
      width: 100%;
      margin-top: 16px;
      margin-right: 0;
    }

    .message-reminder-wrapper {
      width: 100%;
      margin-right: 0;
    }

    // .knowledge-base-wrapper {
    //   width: 100%;
    //   margin-right: 0;
    // }
  }

  ::v-deep .con-right-wrapper > div {
    width: 100%;
    height: auto;
    margin-top: 16px;
    margin-left: 0;
  }

  ::v-deep .video-surveillance-wrapper {
    width: calc((100% - 16px) / 2);

    & + .video-surveillance-wrapper {
      margin-left: 0;
    }

    &:nth-child(2n + 1) {
      margin-right: 16px;
    }
  }
}

@media screen and (min-width: 1200px) {
  // .top-banner-wrapper {
  //   background-size: 100% 110px;
  // }
  .main-con {
    // min-width: 1400px;
    overflow: auto;
  }

  .tab-wrapper {
    flex-wrap: wrap;
    justify-content: start;

    .tab-item-wrapper {
      width: 134px;
    }
  }

  .con-wrapper {
    display: block;
    flex-wrap: wrap;
  }

  ::v-deep .con-left-wrapper {
    flex-wrap: wrap;
    width: 100%;

    .project-overview-wrapper {
      width: calc(100% / 2 - 8px);
      margin-right: 0;
    }

    .approval-center-wrapper {
      width: calc(100% / 2 - 8px);
      margin-top: 0;
      margin-right: 0;
      margin-left: 16px;
    }

    .warning-reminder-wrapper {
      width: calc(100% / 2 - 8px);
      margin-top: 16px;
      margin-right: 0;
      margin-left: 0;
    }

    .message-reminder-wrapper {
      width: calc(100% / 2 - 8px);
      margin-top: 16px;
      margin-right: 0;
      margin-left: 16px;
    }

    // .knowledge-base-wrapper {
    //   width: calc(100% / 2 - 8px);
    //   margin-right: 0;
    //   margin-left: 16px;
    // }
  }

  ::v-deep .con-right-wrapper > div {
    width: 100%;
    height: auto;
    margin-top: 16px;
    margin-left: 0;
  }

  ::v-deep .video-surveillance-wrapper {
    width: calc((100% - 48px) / 4);

    & + .video-surveillance-wrapper {
      margin-left: 16px;
    }

    &:nth-child(2n + 1) {
      margin-right: 0;
    }
  }
}

@media screen and (min-width: 1700px) {
  // .top-banner-wrapper {
  //   background-size: 100% 110px;
  // }
  .main-con {
    min-width: 1400px;
    overflow: auto;
  }

  .tab-wrapper {
    flex-wrap: wrap;
    justify-content: start;

    .tab-item-wrapper {
      width: 10%;
    }
  }

  .con-wrapper {
    display: block;
    flex-wrap: wrap;
  }

  ::v-deep .con-left-wrapper {
    flex-wrap: wrap;
    width: 100%;

    .approval-center-wrapper {
      width: calc(100% / 2 - 8px);
      margin-right: 0;
    }

    .warning-reminder-wrapper {
      width: calc(100% / 2 - 8px);
      margin-top: 16px;
      margin-right: 0;
      margin-left: 0;
    }

    .message-reminder-wrapper {
      width: calc(100% / 2 - 8px);
      margin-right: 0;
      margin-left: 16px;
    }

    // .knowledge-base-wrapper {
    //   width: calc(100% / 2 - 8px);
    //   margin-right: 0;
    //   margin-left: 16px;
    // }
  }

  ::v-deep .con-right-wrapper > div {
    width: 100%;
    height: auto;
    margin-top: 16px;
    margin-left: 0;
  }

  ::v-deep .video-surveillance-wrapper {
    width: calc((100% - 48px) / 4);

    & + .video-surveillance-wrapper {
      margin-left: 16px;
    }

    &:nth-child(2n + 1) {
      margin-right: 0;
    }
  }
}

@media screen and (min-width: 1920px) {
  // .top-banner-wrapper {
  //   background-size: 100% 110px;
  // }
  .con-wrapper {
    display: flex;
    height: calc(100% - 306px);
    min-height: 646px;
    padding-bottom: 0;
  }

  .con-left-wrapper {
    width: calc(100% - 624px);
    height: 100%;
  }

  .con-right-wrapper {
    width: 624px;
    margin-top: 0;
    margin-left: 16px;
  }

  ::v-deep .con-right-wrapper > div {
    width: 100%;
    height: 100%;
    margin-top: 0;
    margin-left: 0;
  }

  ::v-deep .video-surveillance-wrapper {
    width: calc((100% - 16px) / 2);
    height: 272px;

    & + .video-surveillance-wrapper {
      margin-left: 0;
    }

    &:nth-child(2n + 1) {
      margin-right: 16px;
    }
  }

  ::v-deep .project-overview-wrapper {
    height: calc((100% - 16px) / 2);

    & > div:nth-child(3) {
      height: calc(100% - 82px);
    }
  }

  ::v-deep .approval-center-wrapper {
    height: calc((100% - 16px) / 2);

    & > div:nth-child(3) {
      height: calc(100% - 82px);
    }
  }

  ::v-deep .warning-reminder-wrapper {
    height: calc((100% - 16px) / 2);

    & > div:nth-child(3) {
      height: calc(100% - 82px);
    }
  }

  ::v-deep .message-reminder-wrapper {
    height: calc((100% - 16px) / 2);

    & > div:nth-child(3) {
      height: calc(100% - 82px);
    }
  }
  // ::v-deep .knowledge-base-wrapper {
  //   height: calc((100% - 16px) / 2);
  //   & > div:nth-child(3) {
  //     height: calc(100% - 82px);
  //   }
  // }
}

@media screen and (min-width: 2048px) {
  // .top-banner-wrapper {
  //   background-size: 100% 110px;
  // }
  .con-wrapper {
    display: flex;
    height: calc(100% - 306px);
    min-height: 646px;
    padding-bottom: 0;
  }

  .con-left-wrapper {
    width: calc(100% - 624px);
    height: 100%;
  }

  .con-right-wrapper {
    width: 624px;
    margin-top: 0;
    margin-left: 16px;
  }

  ::v-deep .con-right-wrapper > div {
    width: 100%;
    height: 100%;
    margin-top: 0;
    margin-left: 0;
  }

  ::v-deep .project-overview-wrapper {
    height: calc((100% - 16px) / 2);

    & > div:nth-child(3) {
      height: calc(100% - 82px);
    }
  }

  ::v-deep .video-surveillance-wrapper {
    width: calc((100% - 16px) / 2);
    height: 272px;

    & + .video-surveillance-wrapper {
      margin-left: 0;
    }

    &:nth-child(2n + 1) {
      margin-right: 16px;
    }
  }

  ::v-deep .approval-center-wrapper {
    height: calc((100% - 16px) / 2);

    & > div:nth-child(3) {
      height: calc(100% - 82px);
    }
  }

  ::v-deep .warning-reminder-wrapper {
    height: calc((100% - 16px) / 2);

    & > div:nth-child(3) {
      height: calc(100% - 82px);
    }
  }

  ::v-deep .message-reminder-wrapper {
    height: calc((100% - 16px) / 2);

    & > div:nth-child(3) {
      height: calc(100% - 82px);
    }
  }
  // ::v-deep .knowledge-base-wrapper {
  //   height: calc((100% - 16px) / 2);
  //   & > div:nth-child(3) {
  //     height: calc(100% - 82px);
  //   }
  // }
}
</style>
